package com.demo.entity.po;

import java.io.Serializable;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * @Description:AI对话消息表
 * @Date:2025-03-01
 * @author：author
*/
public class AiMessage implements Serializable {

	/**
	 * 消息ID，主键，自增
	 */
	private Long messageId;

	/**
	 * 关联的对话ID，外键
	 */
	private Long chatId;

	/**
	 * 发送者：0用户、1AI
	 */
	private Integer sender;

	/**
	 * 消息内容
	 */
	private String content;

	/**
	 * 发送时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	public void setMessageId(Long messageId) {
		this.messageId = messageId;
	}

	public Long getMessageId() {
		return this.messageId;
	}

	public void setChatId(Long chatId) {
		this.chatId = chatId;
	}

	public Long getChatId() {
		return this.chatId;
	}

	public void setSender(Integer sender) {
		this.sender = sender;
	}

	public Integer getSender() {
		return this.sender;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getContent() {
		return this.content;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	@Override
	public String toString() {
		return "消息ID，主键，自增:" + messageId + ",关联的对话ID，外键:" + chatId + ",发送者：0用户、1AI:" + sender + ",消息内容:" + content + ",发送时间:" + createTime + "";
	}

}